<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>退费报表</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="报表">
	<meta http-equiv="description" content="tuitionReport.jsp">

  </head>
  
  <body> 
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<jsp:include page="/jsp/outward/business/common/menuLink.jsp">
    			<jsp:param name="menuLink" value="[{'name':'报表管理'},{'name':'退费报表'}]"/>
    			<jsp:param name="width" value="40%"/>
    		</jsp:include>
    		<s:hidden name="kindergartenId" id="kindergartenId"></s:hidden>
    		
    		<table cellspacing="1" cellpadding="3" width="100%" bgcolor="#CCCCCC">
				<tr bgcolor="#FFFFFF">
					<td align="right" width="10%" class="label">
						学童编号：
					</td>
					<td align="left" width="21%">
						<s:textfield name="rrvo.childNum" id="childNum" cssStyle="width:80%" cssClass="search"></s:textfield>
					</td>
					<td align="right" width="10%" class="label">
						学童姓名：
					</td>
					<td align="left" width="21%">
						<s:textfield name="rrvo.childName" id="childName" cssStyle="width:80%" cssClass="search"></s:textfield>
					</td>
					<td align="right" width="10%" class="label">
						年份：
					</td>
					<td align="left" width="28%">
						<s:select list="years" listKey="period" listValue="period" name="rrvo.periodStart" id="periodStart" cssStyle="width:100px" cssClass="search"></s:select>
						至
						<s:select list="years" listKey="period" listValue="period" name="rrvo.periodEnd" id="periodEnd" cssStyle="width:100px" cssClass="search"></s:select>
					</td>
				</tr>
			</table>
    		
    		<table cellspacing="1" cellpadding="3" width="100%">
    			<tr>
    				<td align="center">
    					<input type="button" value="ToExcel" class="btn" onclick="toRefundExcel()" />
    					<input type="button" value="重置" class="btn" onclick="toResetSearch()" />
    				</td>
    			</tr>
    		</table>
    	</s:form>
    </center>
    <script type="text/javascript">
    function toRefundExcel()
    {
        if(checkQuery() == false)
            return;
    	var url = realPath + '/inner/common/getRefundReportExcel.action';
		document.forms['frm'].target = '_blank';
		document.forms['frm'].action = url;
		document.forms['frm'].submit();
		//document.forms['frm'].action = realPath + '/inner/common/getReport.action';
		document.forms['frm'].target = '_self';
    }

    function toResetSearch()
    {
    	resetSearch();
    	var periodStart = $('#periodStart');
    	var periodEnd = $('#periodEnd');
    	var date = new Date();
    	var year = date.getYear();
    	periodStart.val(year);
    	periodEnd.val(year);
    }

    function checkQuery()
    {
    	var periodStart = $('#periodStart');
    	var periodEnd = $('#periodEnd');
    	if(parseInt(periodStart.val()) > parseInt(periodEnd.val()))
    	{
    		showMsg('开始年份不能大于结束年份。');
    		return false;
    	}
    	return true;
    }
    </script>
  </body>
</html>
